﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Xml;

namespace Yuanlin.Business
{
    public class DefaultSections 
    {
        private string name = "";
        private Hashtable defaultSection = new Hashtable();

        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                name = value;
            }
        }
        public Hashtable DefaultSection
        {
            get
            {
                return defaultSection;
            }
            set
            {
                defaultSection = value;
            }
        }

        public DefaultSections(XmlNode xmlNode)
        {
            if (xmlNode.Attributes["name"] != null)
            {
                name = xmlNode.Attributes["name"].Value;
            }
            foreach (XmlNode section in xmlNode.SelectNodes("defaultSection"))
            {
                defaultSection[section.Attributes["name"].Value] = new DefaultSection(section);
            }
        }
    }
}
